import type * as Users from "./type"
import { request } from "@/http/service"

/** 获取当前登录用户详情 */
export function getCurrentUserApi() {
  return request<Users.CurrentUserResponseData>({
    url: "auth/me",
    method: "get"
  })
}

export function getUserData(data: any) {
  return request({
    url: "/auth/list",
    method: "post",
    data
  })
}

export function addUserData(data: any) {
  return request({
    url: "/auth/admin/addUser",
    method: "post",
    data
  })
}

export function editUserData(data: any) {
  return request({
    url: "/auth/updateRole",
    method: "post",
    data
  })
}
